﻿using Commons.ReturnData;
using OpenAI.Domain.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace OpenAI.Domain.IRepositories
{
    public interface IChatMessageRepository
    {
        /// <summary>
        /// 新增消息
        /// </summary>
        /// <param name="id"></param>
        /// <param name="appUserId"></param>
        /// <param name="content"></param>
        /// <returns></returns>
        Task<SingleResult> SendChatMessageAsync(ChatMessage chatMessage);
        /// <summary>
        /// 删除消息
        /// </summary>
        /// <param name="id"></param>
        /// <param name="appUserId"></param>
        /// <returns></returns>
        Task<SingleResult> DeleteChatMessageAsync(int id, Guid appUserId);
        /// <summary>
        /// 获取历史记录
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="chatSessionId"></param>
        /// <returns></returns>
        Task<DataResult<ChatMessage>> GetChatMessagesAsync( int pageSize,int chatSessionId);
    }
}
